1. Field of the Invention
The invention generally relates to file operations and more particularly to locked file operations.
2. Description of the Related Art
Collaboration is increasing in the modern computing age. To this end many different users may try to access a given file from a common file server. This creates problems when the file is downloaded by two local clients for operation and one of the clients' requests or performs a write operation, with either the write operation being prohibited or the other client operating using a stale file version.
In this multi-user collaborative environment techniques have been developed to provide control or ownership of the data. For example, in most prior art database systems, a database client creates a transaction with an operation to the database. The client then selects particular rows or pages. In response, the database locks the particular row, table or page, depending upon the database. The database client then inserts, updates or deletes the particular table entries as desired. The database client then performs a commit transaction operation, at which time the database will unlock the particular items which were locked. By providing the lock, the database prevents other users from accessing or overriding the particular rows, tables, and so on, which will be accessed by the first database client.
Similarly, file systems such as CIFS as provided by Microsoft will provide a read lock on a file server when an application on a client workstation reads the particular file. This can be done by as many clients as desired, but in some circumstances only the first client has the possibility of performing write operations. In other cases, CIFS will allow read locks to be broken to allow a particular party to write if desired. Further, CIFS is a stateful operation and if a particular workstation loses its connection to the server, the lock will be lost.
This losing of the connection brings up a second class of clients, those that are connected remotely, rather than over a local area network. WebDAV has attempted to address this problem by providing explicit locking mechanisms. A particular client requests a lock and receives it for a given duration. If the time passes, the lock is released if the client has not re-specified the lock. While this does provide advantages in a remote operation, it still has disadvantages in that all operations must be explicit from the client and are entirely time based.
It is desirable to have an improved file sharing mechanism with improved locking capability, particularly for use with remote clients, to better optimize a file locking operation.